SPIM provides a simple terminal and a X-window interface. Both
provide equivalent functionality, but the X interface is generally
easier to use and more informative.
spim, the terminal version, and xspim, the X version, have
the following command-line options:
- -bare
Simulate a bare MIPS machine without
pseudoinstructions or the additional addressing modes provided by the
assembler. Implies -quiet.
- -asm
Simulate the virtual MIPS machine
provided by the assembler. This is the default.
- -notrap
Do not load the standard trap
handler. This trap handler has two functions that must be assumed by
the user's program. First, it handles traps. When a trap occurs,
SPIM jumps to location 0x80000080, which should contain code to
service the exception. Second, this file contains startup code that
invokes the routine main. Without the trap handler, execution
begins at the instruction labeled __start.
- -trap
Load the standard trap handler. This
is the default.
- -noquiet
Print a message when an exception
occurs. This is the default.
- -quiet
Do not print a message at an
exception.
- -nomapped_io
Disable the memory-mapped IO
facility (see Section ).
- -mapped_io
Enable the memory-mapped IO facility
(see Section ). Programs that use SPIM syscalls (see
Section ) to read from the terminal should not also use
memory-mapped IO.
- -file
Load and execute the assembly code in
the file.
- -execute
Load and execute the code in the
MIPS executable file a.out.
- -s seg size Sets the initial size of memory segment
seg to be size bytes. The memory segments are named:
text, data, stack, ktext, and kdata.
For example, the pair of arguments -sdata 2000000 starts the
user data segment at 2,000,000 bytes.
- -lseg size Sets the limit on how large memory segment
seg can grow to be size bytes. The memory segments
that can grow are: data, stack, and kdata.
Subsections